<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"></meta>
    <title>RegExp</title>
</head>
<body>
<script type="text/javascript">
    //"(?:[^\\\\\\?\\/\\*\\|<>:\"]+/)*(?:[^\\\\\\?\\/\\*\\|<>:\"])*"

    //'^[^\\\\\\?\\/\\*\\|<>:\"]+$'
    var dir = new RegExp('^(?:[^\\\\\\?\\/\\*\\|<>:\"]+/)*(?:[^\\\\\\?\\/\\*\\|<>:\"])+$');
    var doc = new RegExp('^([^\\\\\\?\\/\\*\\|<>:\"]+/)*([^\\\\\\?\\/\\*\\|<>:\"])*\\.\\w+$');
    console.log(dir.test("asdas.md/asdas"));
    alert(doc.test("asdas/asdas.dm"));

</script>
</body>
</html>